package com.vrv.app.cyberspace.common.content;


/**
 * @Author：LJ
 * @Description：角色等级
 * @Date: 2017/12/18
 * @Modified By:
 */
public enum RoleRank {
    LEADER("领导", "ROLE_LEAD"),
    DUTY("值班员", "ROLE_DUTY"),
    LIAISONS("地方联络员", "ROLE_LIAISON"),
    MORTAL("运营单位", "ROLE_UNIT");

    String title;
    String type;

    RoleRank(String title, String type) {
        this.title = title;
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static RoleRank create(String roleType) {
        for (RoleRank r : RoleRank.values()) {
            if (r.getType().equalsIgnoreCase(roleType)) {
                return r;
            }
        }
        return MORTAL;
    }
}
